Skip to content

Conversation

catamorphism
Copy link
Contributor

No description provided.

@bors bors closed this Aug 12, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 24, 2022
Document `pub` requirement for `new_without_default` lint

fixes rust-lang#8415

Also adds some UI tests that ensure that `pub` is required on both the struct _and_ the field. The only thing I'm not sure about is that the lint actually [checks](https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/new_without_default.rs#L102) if `new` is _reachable_, not _public_. To the best of my understanding, both the struct and the method need to be public for the method to be reachable for external crates (I certainly didn't manage to craft a counterexample).

changelog: Document `pub` requirement for ``[`new_without_default`]`` lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants